package com.smart.village.big.screen.domain;

import java.util.List;

public class Polygon {
    private String areaName; // 区域名称（如A、B、C、D）
    private List<Point> vertices; // 多边形顶点列表

    public Polygon(String areaName, List<Point> vertices) {
        // 验证多边形有效性（至少3个顶点）
        if (vertices == null || vertices.size() < 3) {
            throw new IllegalArgumentException("多边形必须包含至少3个顶点");
        }
        this.areaName = areaName;
        this.vertices = vertices;
    }

    public String getAreaName() {
        return areaName;
    }

    public List<Point> getVertices() {
        return vertices;
    }
}
